//
//  BaseViewController.m
//  mUBB
//
//  Created by Cosmin Stirbu on 2/24/13.
//  Copyright (c) 2013 Cosmin Stirbu. All rights reserved.
//

#import "BaseViewController.h"


@interface BaseViewController ()

@end



@implementation BaseViewController

@synthesize isOnScreen = _isOnScreen;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view.
    self.view.backgroundColor = [Utils colorWithHexString:[[ConfigurationManager instance] UIConfigValueForKey:@"background_color"]];
    self.navigationController.navigationBar.tintColor = [Utils colorWithHexString:[[ConfigurationManager instance] UIConfigValueForKey:@"navigation_bar_color"]];
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    _isOnScreen = YES;
}

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    _isOnScreen = NO;
}
- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
